<template>
  <div id="app">
       <top v-if="!(path =='/') "></top>
       <el-row>
         <el-col v-if="!(path =='/') ">
           <navMenu ></navMenu>
           <routeLable ></routeLable>
           <keep-alive>
             <router-view style="height:85vh;overflow: auto;"/>
           </keep-alive>
         </el-col>
       </el-row>



       <el-row v-if="(path =='/') ">
         <router-view/>
       </el-row>


  </div>
</template>
<script>
import top from 'components/top/top'
import navMenu from 'components/navMenu/navMenu'
import routeLable from 'components/routeLable/routeLable'
export default {
  name: 'App',
  components: {
    top,
    navMenu,
    routeLable
  },
  data() {
    return {
      path: ''
    }
  },
  // 判断路由
  mounted() {
    this.path = this.$route.path;
  },
  watch: {
    $route(to, from) {
      this.path = to.path
    }
  }
}
</script>

<style lang="less" scoped>
@import "assets/style/baseStyle";
</style>
